package com.bifang.module.file.dao.model;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 其他类型文件，比如缩略图 水印图等
 *
 * @author chenzh
 * @since 2021-01-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("FILE_RELATIONSHIP")
@Schema(title ="FileRelationship对象", description = "其他类型文件，比如缩略图 水印图等")
public class FileRelationship extends Model<FileRelationship> {

    private static final long serialVersionUID = 1L;

    @Schema(title = "其他处理后文件id")
    @TableId(value = "FILE_ID", type = IdType.INPUT)
    private BigDecimal fileId;

    @Schema(title = "所属主文件id")
    @TableField("MASTER_ID")
    private BigDecimal masterId;

    @Schema(title = "文件类型")
    @TableField("FILE_TYPE")
    private String fileType;

    @Override
    public Serializable pkVal() {
        return this.fileId;
    }
}
